function setRem(){
    var num = document.documentElement.clientWidth;
    document.documentElement.style.fontSize = num / 10.8 + 'px';
}
setRem();
window.onresize = setRem;